package com.ym.medical.domain.entity;

import com.ym.common.constant.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * 标签表对象 labels
 *
 * @author ym
 * @date 2020-08-24
 */
@ApiModel("标签表-实体")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "labels")
public class LabelsEntity extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty("标签类型:01 擅长 02普通标签")
	@Size(max = 2, message = "标签类型:01 擅长 02普通标签长度必须在{min}和{max}之间", groups = {Add.class, Update.class})
	private String dlType;

	@ApiModelProperty("标签值")
	@Size(max = 50, message = "标签值长度必须在{min}和{max}之间", groups = {Add.class, Update.class})
	private String dlValue;

	@ApiModelProperty("00否01是")
	@Size(max = 2, message = "00否01是长度必须在{min}和{max}之间", groups = {Add.class, Update.class})
	private String belongSys;

	@ApiModelProperty("父级ID")
	private Long parentId;

	@ApiModelProperty("是否启用，00禁用01启用")
	@NotNull(message = "00禁用01启用不能为空!", groups = {Add.class})
	@Size(max = 2, message = "00禁用01启用长度必须在{min}和{max}之间", groups = {Add.class, Update.class})
	private String status;

	@ApiModelProperty("创建人")
	@NotNull(message = "创建人不能为空!", groups = {Add.class})
	private Long createSb;

	@ApiModelProperty("创建时间")
	@NotNull(message = "创建时间不能为空!", groups = {Add.class})
	private Date createTime;

	@ApiModelProperty("标签类型:01 擅长 02普通标签")
	private String dlTypeName;

	@ApiModelProperty("00否01是")
	private String belongSysName;

	@ApiModelProperty("00禁用01启用")
	private String statusName;

	public interface Add {

	}

	public interface Update {

	}
}
